build chat app using javascript